package rsj.sql.dynamic;

import rsj.domain.UserInfo;

/**
 * @author yuanqinglong
 * @since 2021/4/27 9:02
 */
public class UserSql {


    public String query(UserInfo userInfo) {
        String sql = "SELECT * FROM sys.sys_user WHERE user_id = #{userId}";
        if (userInfo.getAge() > 17) {
            sql += " AND user_name = #{userName}";
        }
        return sql;
    }
}
